<template>
  <div class="container">
    <home-header></home-header>
    <div class="content">
      <ul class="cont-ul">
        <list v-for="(item,index) in items" :key="index"  :price="item.price" :title="item.title" :img="item.img"></list>
      </ul>
    </div>
    <common-footer></common-footer>
  </div>
</template>

<script type="text/ecmascript-6">
import HomeHeader from '../components/home/homeHead'
import CommonFooter from '../components/common/commonsFooter'
import List from '../components/goodsList'
export default {
  name: 'goods-list',
  data () {
    return {
      items: []
    }
  },
  components: {
    HomeHeader,
    CommonFooter,
    List
  },
  created () {
    this.$http.get('/api/goods').then((data) => {
      this.items = data.body.data
    })
  },
  methods: {}

}
</script>

<style lang="stylus" rel="stylesheet/stylus">
  @import "home.styl";
</style>
